package thread.sysChronize;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Janson
 * @Date 2022/2/28 15:37
 * @Version 1.0
 */
public class TestThreadSynChArrayList extends Thread {
    public static void main(String[] args) throws InterruptedException {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 6669; i++) {
            new Thread("测试线程安全性").start();
            list.add(Thread.currentThread().getName());
            Thread.sleep(10);
        }
        System.out.println(list.size());
    }
}
